package com.aqie.easy.doublePointer;

/**
 * 344. 反转字符串
 */
public class ReverseString {
    public static void reverseString(char[] s) {
        for (int i =0, j = s.length - 1; i< j; i++,j--){
            char tmp = s[i];
            s[i] = s[j];
            s[j] = tmp;
        }

    }

    public static void main(String[] args) {
        char[] s = {'h','e','l','l','o','p'};
        reverseString(s);
        System.out.println(s);
    }
}
